package com.jic.interaction.ChinaPost.model.entity;

import com.jic.interaction.ChinaPost.model.vo.request.CompensationOrderRequest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.util.List;

/**
*@Auther: YGH
*@DATE: 2020/11/5
*@Return:
*@Param:
* 赔付金订单核销接口
*/
@Data
@ApiModel(description = "赔付金订单核销接口实体类")
public class CompensationOrder {


    @ApiModelProperty(notes = "平台编号")
    @NotBlank(message = "平台编号不能为空")
    private String appId; //平台编号

    @ApiModelProperty(notes = "用户ID")
    @NotBlank(message = "用户ID不能为空")
    private String userId; //用户ID

    @ApiModelProperty(notes = "核销支付总金额")
    @NotBlank(message = "核销支付总金额不能为空")
    private String payAmount; //核销支付总金额，保留两位小数

    @ApiModelProperty(notes = "交易流水号")
    @NotBlank(message = "交易流水号不能为空")
    private String reqNo; //交易流水号，全局唯一

    @ApiModelProperty(notes = "核销订单明细列表")
    @NotEmpty(message = "平核销订单明细列表不能为空")
    private List<CompensationOrderRequest.writeOffOrderListModel> writeOffOrderList; //核销订单明细列表

    public static class writeOffOrderListModel{
        @ApiModelProperty(notes = "单笔核销订单号")
        @NotBlank(message = "单笔核销订单号不能为空")
        private String orderNo; //单笔核销订单号

        @ApiModelProperty(notes = "单笔核销金额")
        @NotBlank(message = "单笔核销金额")
        private String writeOffAmount; //单笔核销金额，保留两位小数

        @ApiModelProperty(notes = "核销时间")
        @NotBlank(message = "核销时间不能为空")
        private String writeOffTime;//核销时间
    }
}
